#!/bin/bash

PID=`ps -ef | grep kylin-activation | grep -v grep | grep -v dpkg | awk '{print $2}'`
if [ "$PID" != "" ];then
        kill $PID
fi

PID=`ps -ef | grep activation-daemon | grep -v grep | grep -v dpkg | awk '{print $2}'`
if [ "$PID" != "" ];then
	kill $PID
fi

if [ ! -d /tmp/kylin-activation ];then
    if [ -f /usr/share/kylin-activation/activation_conf.ini ];then
        mkdir -p /tmp/kylin-activation
        cp /usr/share/kylin-activation/activation_conf.ini /tmp/kylin-activation
    fi
fi
